package warmachineroster.presentation.command;

import org.eclipse.gef.commands.Command;

import warmachineroster.WarcasterRosterElement;
import warmachineroster.WarjackRosterElement;

public class WarjackRosterElementCreateCommand extends Command {

	private WarjackRosterElement warjackRosterElement;
	private WarcasterRosterElement warcasterRosterElement;

	public void setWarjackElement(WarjackRosterElement newObject) {
		this.warjackRosterElement = newObject;
	}

	public void setWarcasterRosterElement(
			WarcasterRosterElement warcasterRosterElement) {
		this.warcasterRosterElement = warcasterRosterElement;		
	}

	@Override
	public void execute() {
		warcasterRosterElement.getBattlegroup().add(warjackRosterElement);
	}

	@Override
	public void undo() {
		warcasterRosterElement.getBattlegroup().remove(warjackRosterElement);
	}
	
	

}
